@extends('newAdmin.layout.main')

@section('content')
    <div class="x-nav">
        <span class="layui-breadcrumb">
            <a href="">首页</a>
            <a href="">货物管理</a>
        </span>
        <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
            <i class="layui-icon" style="line-height:30px">ဂ 刷新</i>
        </a>
    </div>
    <div class="x-body">
        <div class="layui-row">
            <form action="{{url('backstage/cargo')}}" class="layui-form layui-col-md12 x-so" method="get">
                <input type="text" name="keywords"  placeholder="请输入用户名/手机号" autocomplete="off" class="layui-input">
                <button class="layui-btn" lay-submit="" lay-filter="sreach"><i class="layui-icon">&#xe615;</i></button>
            </form>
        </div>
        <table class="layui-table">
            <thead>
            <tr>
                <th>ID</th>
                <th>收货人姓名</th>
                <th>收货人手机号</th>
                <th>货物类型</th>
                <th>重量</th>
                <th>体积</th>
                <th>车长</th>
                <th>运费</th>
                <th>状态</th>
                <th>智能发货</th>
                <th>是否协商</th>
                <th>常用货源</th>
                <th>同城可见</th>
                <th>装车时间</th>
            </thead>
            <tbody>
            @foreach($cargos as $cargo)
                <tr>
                    <td>{{$cargo->id}}</td>
                    <td>{{$cargo->receiver_name}}</td>
                    <td>{{$cargo->receiver_phone}}</td>
                    <td>{{$cargo->type}}</td>
                    <td>{{$cargo->weight}}</td>
                    <td>{{$cargo->volume}}</td>
                    <td>{{$cargo->car_lenght}}</td>
                    <td>{{$cargo->price}}</td>
                    <td>{{$cargo->status}}</td>
                    <td>{{$cargo->is_auto}}</td>
                    <td>{{$cargo->is_discuss}}</td>
                    <td>{{$cargo->is_common}}</td>
                    <td>{{$cargo->is_visible}}</td>
                    <td>{{$cargo->loading_time}}</td>
                </tr>
            @endforeach
            </tbody>
        </table>
        <div class="page">
            {{$cargos->appends(['keywords' => $keywords])->links()}}
        </div>
    </div>
@endsection
